#ifndef SETTINGSHELPER_H
#define SETTINGSHELPER_H

class Settings;

#include "common.h"
#include "Scheduler.h"

class Settings
{
public:
	struct CassiopeiaMainData
	{
		bool AdvancedShowDesktop;
		bool DeskNotes;
		bool Scheduler;
		bool DeskTidy;
		bool DesktopPictureFrame;
		bool WindowTools;
	};

	struct DeskNotesData
	{
		RECT DeskNoteBounds;
		bool Shrunken;
		int RestoredHeight;
		bool TopMost;
		bool TransparentOnLeave;
		int ZoomNumerator;
		int ZoomDenominator;
		POINT ScrollPosition;
	};

	struct SchedulerData
	{
		Scheduler::AlertTimeInfo Alert;
		TCHAR LastSoundFile[_MAX_PATH];
		bool LastSoundActive;
	};

	struct DeskTidyWndData
	{
		RECT Bounds;
		TCHAR Text[_MAX_PATH];
		bool Visible;
		bool Active;
		bool Locked;
		set<tstring, TStringSortTemplate> ExtensionList;
	};

	struct DeskTidyData
	{
		map<int, DeskTidyWndData> DeskTidyWndData;
		int IDCounter;
		list<int> FreeIDPool;
	};

	struct DesktopPictureFrameData
	{
		RECT Bounds;
	};

	struct Data
	{
		CassiopeiaMainData CassiopeiaMainData;
		DeskNotesData DeskNotesData;
		SchedulerData SchedulerData;
		DeskTidyData DeskTidyData;
		DesktopPictureFrameData DesktopPictureFrameData;
	};
	
	Settings();
	bool Save(Settings::Data data);
	bool Load(Settings::Data * data);
};

#endif
